<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="Expires" content="0">
		<meta http-equiv="Pragma" content="no-cache">
		<meta http-equiv="Cache-control" content="no-cache">
		<meta http-equiv="Cache" content="no-cache">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
		<title>数据字段类别</title>
		<script type="text/javascript" src="../../commonFragment/header.js"></script>
		<script type="text/javascript" src="../../commonFragment/nojs.header.js"></script>
		<script src="../../assets/js/system/dict.js?v=2" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="container-fluid p-t-15">
			<div class="row">
				<div class="col-lg-12">
					<div class="card">
						<div class="card-body">
							<div class="btn-group-vertical btn-group-sm" style="display: none;" id="rightMenu">
								<button class="btn btn-success" type="button" onclick="add();"><i class="glyphicon glyphicon-plus"></i>添加</button>
								<button class="btn btn-default" type="button" onclick="edit();"><span class="glyphicon glyphicon-edit"></span>编辑</button>
								<button class="btn btn-warning" type="button" onclick="del();" data-toggle="tooltip" title="将会删除此节点以及子节点">
									<span class="glyphicon glyphicon-trash"></span>删除
								</button>
							</div>
							<div class="row">
								<!-- 左侧树 -->
								<div class="col-md-2 col-sm-2">
									<div class="panel panel-default">
										<div class="panel-heading">
											<h3 class="panel-title">
												数据字典树
											</h3>
										</div>
										<div class="panel-body">
											<ul id="treeDemo" class="ztree" style="width: 100%;" data-url="/system/dict/children?pid=0" data-setting="dictTreeSetting"></ul>
										</div>
									</div>
								</div>
								<!-- 右侧列表 -->
								<div class="col-md-10 col-sm-10">
									<div class="panel panel-default">
										<div class="panel-heading">
											<h3 class="panel-title">
												数据字典列表
											</h3>
										</div>
										<div class="panel-body">
											
											<form id="toolbar" class="form-inline">
												<!-- 操作按钮 -->
												<div class="form-group btn-group btn-group-sm">
													<button type="button" class="btn btn-sm btn-success add-multitab" data-id="add-dict-form" data-url="module/system/lcxm_system_dict_form.html"
													 data-title="新增数据字典">
														<i class="glyphicon glyphicon-plus"></i> 添加根节点
														<i class="action-param" data-key="pid" data-value=""></i>
													</button>
												</div>
												<!-- 查询条件 -->
												<div class="form-group hide">
													<label class="sr-only" for="lookup-pid">父节点</label>
													<input type="text" class="form-control input-sm" id="lookup-pid" name="pid" placeholder="请输入pid"
													 autocomplete="off" />
												</div>
												<div class="form-group">
													<label class="sr-only" for="lookup-name">名称</label>
													<input type="text" class="form-control input-sm" id="lookup-name" name="name" placeholder="请输入名称"
													 autocomplete="off" />
												</div>
												<div class="form-group">
													<label class="sr-only" for="lookup-code">code</label>
													<input type="text" class="form-control input-sm" id="lookup-code" name="code" value="" placeholder="请输入code"
													 autocomplete="off" />
												</div>
											
												<div class="form-group">
													<label class="sr-only" for="lookup-enable">是否启用</label>
													<select class="form-control input-sm" id="lookup-enable" name="enable" data-value="">
														<option value="">--请选择是否启用--</option>
														<option value="0">否</option>
														<option value="1">是</option>
													</select>
												</div>
											
												<div class="form-group ">
													<button type="button" class="btn btn-primary btn-sm query">
														<i class="glyphicon glyphicon-search"></i> 查询
													</button>
													<button type="button" class="btn btn-info btn-sm reset">
														<i class="glyphicon glyphicon-refresh"></i> 重置
													</button>
												</div>
											
											</form>
											<table id="table" class="table table-bordered table-hover table-striped bootstrapTable" data-list-url="/system/dict/list"
											 data-form-url="module/system/lcxm_system_dict_form.html" data-del-url="/system/dict/delete" data-toolbar="#toolbar">
												<thead>
													<tr>
														<th data-checkbox="true"></th>
														<th data-field="name" data-click-to-select="true">名称</th>
														<th data-field="code">code</th>
														<th data-field="value">值</th>
														<th data-field="sort">序号</th>
														<th data-field="remark">备注</th>
														<th data-field="createTime" data-sortable="true">创建时间</th>
													</tr>
												</thead>
											</table>
											
										</div>
									</div>
									
									
								</div>
							</div>

						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 隐藏的form 用来新增和编辑 -->
		<div class="hide">
			<form class="form-horizontal validate" role="form " method="post" action="/system/dict/save" data-form-url="/system/dict/detail">
				<!-- 隐藏域 -->
				<div class="form-group hide">
					<input type="hidden" name="id" :value="id" />
					<input type="hidden" id="pid" name="pid" :value="pid" value="" />
				</div>

				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">名称</label>
					<div class="col-sm-7">
						<input type="text" class="form-control" id="url" name="name" :value="name" data-rule-required="true" placeholder="请输入字典名称"
						 autocomplete="off" />
					</div>
					<div class="col-sm-3  help-inline form-control-static"></div>
				</div>

				<div class="form-group">
					<label for="code" class="col-sm-2 control-label">编码*</label>
					<div class="col-sm-7 ">
						<input type="text" class="form-control" id="code" name="code" :value="code" data-rule-repeat="/system/dict/check"
						 data-msg-repeat="code重复" data-rule-required="true" placeholder="请输入字典编码" autocomplete="off" />
					</div>
					<div class="col-sm-3  help-inline form-control-static"></div>
				</div>

				<div class="form-group">
					<label for="value" class="col-sm-2 control-label">值</label>
					<div class="col-sm-7">
						<input type="text" class="form-control" id="value" name="value" :value="value" placeholder="请输入字典值" autocomplete="off" />
					</div>
					<div class="col-sm-3  help-inline form-control-static"></div>
				</div>

				<div class="form-group">
					<label for="remark" class="col-sm-2 control-label">备注</label>
					<div class="col-sm-7 ">
						<input type="text" class="form-control" id="remark" name="remark" :value="remark" placeholder="请输入字典备注">
					</div>
					<div class="col-sm-3  help-inline form-control-static"></div>
				</div>

				<div class="form-group">
					<label for="sort" class="col-sm-2 control-label">序号*</label>
					<div class="col-sm-7 ">
						<input type="number" class="form-control" id="sort" name="sort" :value="sort" data-rule-required="true"
						 data-rule-digits="true" data-rule-number="true" placeholder="请输入序号" autocomplete="off">
					</div>
					<div class="col-sm-3  help-inline form-control-static"></div>
				</div>

				<div class="form-group">
					<label for="enable" class="col-sm-2 control-label">状态*</label>
					<div class="col-sm-7 ">
						<select class="form-control" id="enable" name="enable" :data-value="enable" :value="enable" data-rule-required="true">
							<option value="">--请选择--</option>
							<option value="false">禁用</option>
							<option value="true">启用</option>
						</select>
					</div>
					<div class="col-sm-3  help-inline form-control-static"></div>
				</div>
			</form>
		</div>
	</body>

</html>
